package jobOo;

public class Car1 {
    String brand;
    String color;
    int price;

    Car1() {

    }

    Car1(String brand, String color, int price) {
        this.brand = brand;
        this.color = color;
        this.price = price;
    }

    void start() {
        System.out.println(brand + "品牌、" + color + "的、" + price + "万的车启动了...");
    }

    void run() {
        System.out.println(brand + "品牌、" + color + "的、" + price + "万的车开始行驶了...");
    }

    void stop() {
        System.out.println(brand + "品牌、" + color + "的、" + price + "万的车停止了...");
    }

}


class CarTest1 {
    public static void main(String[] args) {
        Car car1=new Car();
        car1.brand="雪佛兰";
        car1.color="黑黄色";
        car1.price=40;
        car1.start();
        car1.run();
        car1.stop();


        Car car2=new Car("雪佛兰","黄色",20);
        car2.start();
        car2.run();
        car2.stop();
    }
}

